﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TileEngine.tiles.material;
using TileEngine.items.tiles.material;

namespace TileEngine.recipes
{
    class Recipes
    {
        public static List<Recipe> recipes = new List<Recipe>();
        public static void addRecipes()
        {
            recipes.Clear();
            for (int i = 0; i < 5; i++)
            {


                recipes.Add(new Recipe(new Ingredient(typeof(BoronItem), 1), null, new Ingredient(typeof(DirtItem), 2), new Ingredient(typeof(GoldItem), 1)));
                recipes.Add(new Recipe(new Ingredient(typeof(AdamentineItem), 1), null, new Ingredient(typeof(DirtItem), 3), new Ingredient(typeof(StoneItem), 1)));
                recipes.Add(new Recipe(new Ingredient(typeof(StoneItem), 1), null, new Ingredient(typeof(DirtItem), 4), new Ingredient(typeof(GoldItem), 1)));
                recipes.Add(new Recipe(new Ingredient(typeof(MithrilItem), 1), null, new Ingredient(typeof(DirtItem), 4), new Ingredient(typeof(GoldItem), 1)));
                recipes.Add(new Recipe(new Ingredient(typeof(PlatinumItem), 1), null, new Ingredient(typeof(DirtItem), 3), new Ingredient(typeof(GoldItem), 1)));
                recipes.Add(new Recipe(new Ingredient(typeof(CobaltItem), 1), null, new Ingredient(typeof(DirtItem), 2), new Ingredient(typeof(GoldItem), 1)));
            }
        }
        public static Recipe getRecipe(Type item)
        {
            for (int i = 0; i < recipes.Count; i++)
            {
                if (recipes[i].output.item == item)
                    return recipes[i];
            }
            return null;
        }
    }
}
